/**
 * Project Name:EMSInterfaceTest
 * File Name:PayBatchControllerQuery.java
 * Package Name:functions.ems_payment
 * Date:2018年7月27日下午2:39:30
 * Copyright (c) 2018, crpcg@crpcg.com All Rights Reserved.
 *
 */

package functions.ems_payment;

import java.util.HashMap;
import java.util.Map;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import coms.Constants;
import frame.HttpHelper;


	 
/**
 * 
 * @author CHENHAILIAN6
 *
 */
public class PayBatchController{

	private static Logger logger = LoggerFactory.getLogger(PayBatchController.class);
	String result;
	boolean isPassed;
	JSONObject resultJsonObject;
	
	

	public String getResult() {
		return result;
	}



	public void setResult(String result) {
		this.result = result;
	}



	public boolean isPassed() {
		return isPassed;
	}



	public void setPassed(boolean isPassed) {
		this.isPassed = isPassed;
	}



	public JSONObject getResultJsonObject() {
		return resultJsonObject;
	}



	public void setResultJsonObject(JSONObject resultJsonObject) {
		this.resultJsonObject = resultJsonObject;
	}



	/**
	 * 
	 * @param paramMap
	 * queryPayBatchInfoUrl  = "/ems-payment/PayBatchController/info/queryPayBatchInfo";
	 */
	public void queryPayBatchInfo(Map<Object, Object> paramMap) {
		String batchNo = "";
		if(paramMap !=null) {
			batchNo = (String) paramMap.get("batchNo");
			if(batchNo == null) {
				batchNo = "";
			}
		}
		String url = Constants.QUERY_PAY_BATCH_INFO_URL + "/"+batchNo;
		try {
			result = HttpHelper.post("", url);
			if(HttpHelper.isOk) {
				isPassed = HttpHelper.isOk;
				resultJsonObject = new JSONObject(result);
				logger.info("queryPayBatchInfo==============="+result);
			}
			
		} catch (Exception e) {
			
			// TODO Auto-generated catch block
			e.printStackTrace();
			
		}
	}
	

	
}

